<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box1 {
            width: 100px;
            height: 100px;
            background-color: red;
            float: left;
        }

        .box2 {
            width: 110px;
            height: 110px;
            background-color: yellow;
            float: right;
            /* clear: left; */
            /* 
            1浮动以后导致2位置受到影响 如果才能避免影响
            清除浮动：
            clear：值；
              可选值：
              none 不清除浮动影响，默认值
              left 清除左浮动影响
              right 清除右浮动影响
              both 清除左右浮动影响
            */
        }

        .box3 {
            width: 120px;
            height: 120px;
            background-color: pink;
            clear: both;
        }
    </style>
</head>

<body>
    <div class="box1"></div>
    <div class="box2"></div>
    <div class="box3"></div>
</body>

</html>